<include file="Public:headersmall"/>
<style>
.center{width:645px;margin:0 auto;margin-top:40px}
.choose1{width:400px;height:300px;border:1px solid #dddddd;float:left;padding:10px}
.choose2{width:200px;height:300px;margin-left:-1px;border:1px solid #dddddd;float:left;padding:10px}
.input{padding:5px;width:170px}
#save{border:0px;font-weight:bold;background:#317ee7;color:#fff;width:110px}
#save:hover{background:#ffba00}
#give{border:0px;font-weight:bold;background:#da2127;color:#fff;width:110px}
#give:hover{background:#ffba00}
</style>


<div class="center">
   <div class="choose1">
     <div style="font-size:20px;color:#317ee7;border-bottom:1px solid #dddddd;padding:5px">补充信息<span style="font-size:12px">(可选)</span></div>
	 <div style="margin-top:40px;font-size:13px">
		<table border="0" width="100%" id="table1">
			<tr>
				<td align="right">电子邮箱：</td>
				<td><input type="text" class="input" name="qemail" size="20"></td>
			</tr>
			<tr>
				<td align="right">设置密码：</td>
				<td><input type="password" class="input" name="qpwd" size="20"></td>
			</tr>
			<tr>
				<td align="right">重复密码：</td>
				<td><input type="password" class="input" name="qrpwd" size="20"></td>
			</tr>
		</table>
	</div>
	<div style="text-align:center;margin-top:30px">
	    <input type="button" class="input" value="保存信息" id="save">
		<input type="button" class="input" value="跳过补充" id="give">
	</div>
   </div>

   <div class="choose2">
   <div style="font-size:20px;color:#317ee7;border-bottom:1px solid #dddddd;padding:5px">温馨提示<span style="font-size:12px"></span></div>
   <div style="margin-top:40px">
     1、此步骤可以跳过<br>
	 2、补充E_mail后可以通过此邮箱直接登陆，同时也可以继续使用QQ登陆！<br>
	 3、不补充信息以后可以继续通过QQ登陆本商城
   </div>
   </div>

</div>



<script>
$(document).ready(function(){
jSuccess("<strong>QQ登陆成功！提示：补充信息可以跳过</strong>",{TimeShown : 3000,VerticalPosition : 'center',HorizontalPosition : 'center'})

$("#save").click(function(){
    var pwd=$("[name=qpwd]").val();
	var rpwd=$("[name=qrpwd]").val();
	var email=$("[name=qemail]").val();

	if(pwd!=rpwd){
	    jError("<strong>两次密码不一致！</strong>",{VerticalPosition : 'center',HorizontalPosition : 'center'});
		$("[name=qrpwd]").val('');
	}else{
	     $.ajax({
		        type:"POST",
				url:"__URL__/setqquc",
				dataType:"json",
				data:{'email':email,'pwd':pwd},
				success:function(data){
				   if(data==1){
				      jError("<strong>此邮箱已被注册！请换一个邮箱</strong>",{VerticalPosition : 'center',HorizontalPosition : 'center'});
				   }else if(data==2){
				      jSuccess("<strong>修改成功！</strong>",{TimeShown : 2000,VerticalPosition : 'center',HorizontalPosition : 'center',onClosed:function(){window.location.href="__APP__";}})
				   }else{
				      jError("<strong>修改失败！请重试</strong>",{TimeShown : 2000,VerticalPosition : 'center',HorizontalPosition : 'center'})
				   }
				}
		})

	}
})

$("#give").click(function(){
window.location.href="__APP__";
})

})
</script>

<link rel="stylesheet" type="text/css" href="__APP__/statics/css/jNotify.jquery.css" />
<script type="text/javascript" src="__APP__/statics/jNotify.jquery.js"></script>
<div style="clear:both"></div>
<include file="Public:footersmall"/>